import React, {FC, useCallback} from 'react'

export const Test02: FC = () => {
  const openDirectorySelector = useCallback(() => {
    // 触发主进程事件
    window.electronApis.selectFile()
    // 传入渲染进程监听回调
    window.electronApis.printFileLink((fileLink: string) => {
      console.log(fileLink)
    })
  }, [])
  return (
    <>
      <button onClick={openDirectorySelector}>选择文件</button>
    </>
  )
}
